<template>
    <div>
        <el-container>
            <!--顶部-->
                <el-header>              
                    <div  class="header" >
                        <el-row>
                            <el-col :span=4 class="headerCol">
                                <el-image :src="require('../../../img/littleIcon/doctorLogo.png')"></el-image>
                            </el-col>
                        </el-row>                  
                    </div>
                </el-header>
                <el-divider></el-divider>
                <el-main>
                    <el-row>
                        <el-col span="9" offset="3">
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>既往史:</h3><br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{this.case.previousHistory}}
                                </div>
                            </el-card><br>
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>家族史:</h3><br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{this.case.familyHistory}}
                                </div>
                            </el-card><br>
                        </el-col>
                        <el-col :span="9" offset="1">
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>过敏史:</h3><br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{this.case.allergicHistory}}
                                </div>
                            </el-card><br>
                            <el-card class="box-card">
                                <div class="text item">
                                    <h3>病史:</h3><br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{this.case.medicalHistory}}
                                </div>
                            </el-card><br>
                        </el-col>
                            <el-col :span="9" offset="3">
                                <el-card class="box-card">
                                <div class="text item">
                                    <h3>慢性病:</h3><br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{this.case.chronicDisease}}
                                </div>
                            </el-card><br>
                        </el-col>                        
                </el-row>
                </el-main>
        </el-container>
    </div>
</template>

<script>
import axios from 'axios'
export default {
    data() {
        return {
            case:'',
            
        }
    },
    created(){
        axios.get("/memberMedicalhistory/queryByMemberId",)
        .then(res => {
            if(res.data.length==0){
                this.$router.push("/ko")
            }else{
                this.case=res.data
            }
        })
        .catch(err => {
            this.$router.push("/ko")
            console.error(err); 
        })
    }
}
</script>

<style scoped>
    .headerCol{
        margin-top: 10px;
        text-align: left;
    }
    .text-align{
        text-align: left;
    }
    .text {
    /* font-size: 14px; */
    text-align: left;
    font-size: 17px;
  }

  .item {
    padding: 18px 0;
  }

  .box-card {
    width: 480px;
    background-color: whitesmoke;
    height: 220px;
  }
</style>